package com.imooc.reader.management.task;

import com.imooc.reader.management.service.BookService;
import jakarta.annotation.Resource;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ComputeTask {
    @Resource
    private BookService bookService;

    @Scheduled(cron = "0 * * * * ?")
    public void updateScore() {
        bookService.updateScore();
    }
}
